  <template>
  <div></div>
</template>

<script>
import Oidc from "oidc-client";
import store from '../store'

new Oidc.UserManager()
  .signinRedirectCallback()
  .then(function (response) {
    if (response.access_token) {
      //保存token
      store.commit('setAssessToken',response.access_token);
       //保存Id_token
      store.commit('setIdToken',response.id_token);
      //保存用户昵称
      store.commit('setUserName',response.profile.name);
        //保存用户Id
      store.commit('setUserId',response.profile.sub);
    }
    window.location = "/Home/Index";
  })
  .catch(function (e) {});
export default {};
</script>